function fig2_23

global ep0

N=100;
epE=linspace(-4,0,N);

sum=1;
for i=2:8
    sum=sum+1/(i*factorial(i));
end
sum

for i=1:N
    ep0=10^epE(i);
    ep(i)=ep0;
    V(i)=exp(1)*log(1+ep0)-log(ep0)-int2(@f,0,1);
    ff(i)=sum-log(ep0);
end

clf
% get(gcf)
set(gcf,'Position', [25 1115 658 230])
co = [0 0 1;
    0 0.5 0;
    1 0 0;
    0 0.75 0.75;
    0.75 0 0.75;
    0.75 0.75 0;
    0.25 0.25 0.25];
set(groot,'defaultAxesColorOrder',co)
subaxis(1,1,1,1,'MT',0.01,'MB',0.2,'MR',0.01,'ML',0.05,'P',0.04)

loglog(ep,V,'b','LineWidth',1.3)
hold on
loglog(ep,ff,'--r','LineWidth',1.3)
box on
grid on

ax = gca;
ax.XAxis.TickLabelInterpreter = 'latex';
ax.YAxis.TickLabelInterpreter = 'latex';
set(gca,'FontSize',13)

legend(' Num',' Asy','Location','SouthWest','FontSize',13,'Interpreter','latex')
xlabel('$\varepsilon$\,-\,axis','Interpreter','latex','FontSize',14)
%ylabel('f','FontSize',16,'FontWeight','bold')

%exportgraphics(gca,'/Users/mark/Desktop/integral1.pdf')

function y=f(x)
global ep0
%y=exp(x)/(ep0+x);
y=exp(x)*log(ep0+x);